//
//  HouseDetailDataManage.m
//  WGFGlobalHouses
//
//  Created by waiguofang on 15/5/7.
//  Copyright (c) 2015年 waiguofang. All rights reserved.
//  房屋详情的界面的数据层

#import "HouseDetailDataManage.h"
#import "API.h"
#import "JSONKit.h"
#import "HouseTypeViewModel.h"
#import "HouseTypeData.h"

@implementation HouseDetailDataManage

-(ResulteMod *)refreshDataWithConsumerId:(NSString*)consumerId WithPremiseshousingId:(NSInteger)premiseshousingId;
{

    NSString *urlStr = [NSString stringWithFormat:@"%@/%ld/%@",[API urlMake:HouseDetail],(long)premiseshousingId,consumerId];
    
    ResulteMod *mod = [Connect doGetWithCaChe:urlStr];
    NSDictionary *resDic = [mod.resultData objectFromJSONStringWithParseOptions:JKParseOptionLooseUnicode];
    
    NSDictionary *abstractResponseDic = resDic[@"abstractResponse"];

     NSDictionary *mainDic = abstractResponseDic[@"housingDetailDto"];
    
    HouseTypeData *model = [[HouseTypeData alloc]initWithDic:mainDic];
    
    mod.dataMod = model;
    
    NSLog(@"房屋详情的数据 %@",mainDic);
    
    return mod;
}

-(NSArray *)loadMoreDateWithConsumerId:(NSInteger)consumerId WithPremiseshousingId:(NSInteger)premiseshousingId;
{
    return nil;
}

@end
